-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DB Migrations #1158
Merged
Merged
Fix DB Migrations #1158
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mythicaeda
had a problem deploying
to
e2e-test
September 28, 2023 17:20 — with
GitHub Actions
Failure
Mythicaeda
force-pushed
the
fix/migrations
branch
from
September 28, 2023 17:27
726c16d
to
2147485
Compare
Could you elaborate on the manual verification steps? I'm not sure I understand the issue well enough to reproduce it |
Added elaboration 👍 |
Mythicaeda
force-pushed
the
fix/migrations
branch
from
September 28, 2023 21:29
2147485
to
e18ba8d
Compare
Mythicaeda
had a problem deploying
to
e2e-test
September 28, 2023 21:29 — with
GitHub Actions
Failure
Mythicaeda
had a problem deploying
to
e2e-test
September 28, 2023 21:29 — with
GitHub Actions
Failure
mattdailis
approved these changes
Sep 28, 2023
Just to confirm, these fixes are for deployments that haven't applied these migrations yet, and don't need to be backfixed for e.g. |
@skovati Yes |
skovati
approved these changes
Sep 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolves three bugs in our migrations:
users
migration,Aerie Legacy
could accidentally get into theusers
table early. This would most likely occur as a side-effect of thetags
migration using the username to indicate that a tag was from a version of Aerie prior to thetags
table. This would cause a constraint violation when the migration went to assign allowed roles to all users added, and even if it didn't, there would be an on-insert conflict when the system users were properly added. This has been resolved by deleting the system users if they exist after all the insertions have occurred.definition_consistency
migration, rows with anull
definition
field would violate the addednot null
constraint. This has been resolved by updating the rows with anull
field to thedefault
value for the row before setting thenot null
.mark_migration_rolled_back
call in the down.sqlVerification
Manual Verification in two ways:
owner
wasAerie Legacy
and another whoseowner
wasMission Model
; adding a scheduling goal and scheduling constraint withnull
definition
fields). I then migrated the database up to the latest version. All migrations were done using our Python DB migration helper.Documentation
No docs need to be updated.
Future work
Related to (3), I've created this issue